<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="pragma" content="no-cache" />
	<link rel="stylesheet" href="/css/style.css" type="text/css"/>
	<script type="text/javascript" src="/js/jquery.js"></script>
	<script type="text/javascript" src="/js/util.js"></script>
</head>
<script type="text/javascript">
//////////////////////////////////////////////////////////////////////
////  email = "wenpin.qian@happyelements.com"                     ////
////  team = "Athene"                                             ////
////  warnings = "This is generated page,Do Not Modify!";         ////
////  tips = "Opera & IE not supported|Chrome & Safari sugguested"////
//////////////////////////////////////////////////////////////////////
var SkillTriggerstr = window.dialogArguments;
var SkillTrigger = null;
if(SkillTriggerstr != undefined && SkillTriggerstr != "" && SkillTriggerstr != "{}") {
		SkillTrigger = s2json(SkillTriggerstr);
}
$(document).ready(function() {
	if(SkillTrigger != undefined) {
	
	$('#condition').val(SkillTrigger.condition);	
	$('#conditionValueType').val(SkillTrigger.conditionValueType);	
	$('#conditionValue').val(SkillTrigger.conditionValue);		
	}
	listselectors();
});
window.returnValue = SkillTriggerstr;

function listselectors() {
}

function submitSkillTrigger() {
	window.returnValue = json2s({
			
			condition:$('#condition').val(),			
			conditionValueType:$('#conditionValueType').val(),			
			conditionValue:xparseInt($('#conditionValue').val()),						
	});
	beforeWindowClose();
	window.close();
}

function beforeWindowClose() {
	if(window.returnCallback) {
		window.returnCallback(window.returnValue);
	}
	window.onbeforeunload = null;
	return true;
}

</script>
<body onunload="beforeWindowClose()">
	<div class="addarea">
	<table>
		<tbody>			
				<tr>				<td>
					<label for="condition">触发条件</label>
																	<select id="condition" name="condition">
							
								<option value="0">无触发条件</option>
							
								<option value="1">低生命触发</option>
							
								<option value="2">天气触发</option>
							
								<option value="3">状态触发</option>
													</select>
									</td>
							
								<td>
					<label for="conditionValueType">触发值类型</label>
																	<select id="conditionValueType" name="conditionValueType">
							
								<option value="0">数值</option>
							
								<option value="1">百分比</option>
													</select>
									</td>
				</tr>			
				<tr>				<td>
					<label for="conditionValue">触发值</label>
					
						<input type="text" id="conditionValue" name="conditionValue" />
									</td>
									</tbody>
	</table>
	</div>
	<input type="button" onclick="submitSkillTrigger()" value="提交"/>
</body>